﻿@{
    Layout = null;
}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
    <title>flash上传头像组件演示</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="Keywords" content="flash头像上传组件，仿新浪微博头像上传组件，头像图片剪裁" />
    <meta name="Description" content="flash 上传头像，用户体验好，头像剪裁，预览组件" />
    <style type="text/css" media="screen">
        html, body {
            height: 100%;
            background-color: #ffffff;
        }

        #flashContent {
            width: 100%;
            height: 100%;
        }
    </style>

    <script type="text/javascript">
        function uploadevent(status, picUrl, callbackdata) {
            //alert(picUrl); //后端存储图片
            //	alert(callbackdata);
            status += '';
            switch (status) {
                case '1':
                    var time = new Date().getTime();
                    var filename162 = picUrl + '_162.jpg';
                    var filename48 = picUrl + '_48.jpg';
                    var filename20 = picUrl + "_20.jpg";

                    document.getElementById('avatar_priview').innerHTML = "头像1 : <img src='" + filename162 + "?" + time + "'/> <br/> 头像2: <img src='" + filename48 + "?" + time + "'/><br/> 头像3: <img src='" + filename20 + "?" + time + "'/>";

                    break;
                case '-1':
                    window.location.reload();
                    break;
                default:
                    window.location.reload();
            }
        }
    </script>
</head>
<body>
    <div id="altContent">


        <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
            codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
            width="650" height="450" id="myMovieName">
            <param name="movie" value="/Content/avatar/avatar.swf">
            <param name="quality" value="high">
            <param name="bgcolor" value="#FFFFFF">
            <param name="flashvars" value="imgUrl=/Content/avatar/default.jpg&uploadUrl=/Content/avatar/upfile.aspx&uploadSrc=false" />
            <embed src="/Content/avatar/avatar.swf" quality="high" bgcolor="#FFFFFF" width="650" height="450" wmode="transparent" flashvars="imgUrl=/Content/avatar/default.jpg&uploadUrl=/Flash/Upload&uploadSrc=false"
                name="myMovieName" align="" type="application/x-shockwave-flash" allowscriptaccess="always"
                pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
        </object>


    </div>

    <div id="avatar_priview"></div>

</body>
</html>
